import psycopg

with psycopg.connect("dbname=examdb user=examdb") as conn:
	with conn.cursor() as cur:
		stmt = """
		INSERT INTO test_tbl1 (sn, name) 
		VALUES (%(sn)s, %(name)s) 
		"""
		for i in range(10):
			sn = 2001 + i
			name = f"test-{sn}"
			cur.execute(stmt, dict(sn=sn, name=name) )
	


